package com.man.mapper;

import com.man.pojo.Book;
import com.man.pojo.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @CallsName: userMapper
 */
@Mapper
public interface UserMapper {
    /*增*/
    void insert(String username, String email, String password);

    /*删*/
    boolean deleteByUser(User username);

    /*改*/
    void update(User user);

    /*查*/
    User selectByUsername(String username);

    Book selectByBook(String name);

    /*查所有*/
    List<User> selectAll();

    List<Book> selectAllBook();


    //修改密码
    void updatePwd(String password, Integer id);

    void addBook(String book, String bookName);

    void deleteByBook(String book, Integer id);
    /*修改密码*/

}
